Fast dynamic casting

نویسندگان

  • Michael Gibbs
  • Bjarne Stroustrup
چکیده

We describe a scheme for implementing dynamic casts suitable for systems where the performance and predictability of performance is essential. A dynamic cast from a base class to a derived class in an objectoriented language can be performed quickly by having the linker assign an integer type ID to each class. A simple integer arithmetic operation verifies whether the cast is legal at run time. The type ID scheme presented uses the modulo function to check that one class derives from another. A 64-bit type ID is sufficient to handle class hierarchies of large size at least nine levels of derivation deep. We also discuss the pointer adjustments required for a C++ dynamic cast. All examples will be drawn from the C++ language. Copyright c © 2005 John Wiley & Sons, Ltd.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Interactive and Scalable Ray-Casting of Metaballs on the GPU

Metaballs are a useful technique to model blobby surfaces. Because metaballs define an implicit surface, rendering is difficult. We seek to render the surface directly via ray-casting, to precisely locate the isosurfaces and preserve the concise representation of the surface. To perform this rendering at interactive rates on dynamic data, we will use acceleration structures for fast surface cal...

متن کامل

Fast Projection-Based Ray-Casting Algorithm for Rendering Curvilinear Volumes

ÐWe present an efficient and robust ray-casting algorithm for directly rendering a curvilinear volume of arbitrarily-shaped cells. By projecting cell-faces onto the image plane, we have effectively addressed three critical steps of the ray-casting process, namely finding the entry cell-faces for a ray, traversing along the ray from one cell to another, and reconstructing data values at the ray/...

متن کامل

A real-time dynamic holographic material using a fast photochromic molecule

We have developed a real-time, dynamic holographic material that exhibits rapid colouration upon irradiation with UV light and successive fast thermal bleaching within tens of milliseconds at room temperature. Photochromic polymer films were prepared by a simple solution-casting method from the benzene solution of the mixture of the photochromic molecule, poly(ethyl acrylate), and poly(phenoxye...

متن کامل

Dynamic Grid Refinement for Fluid Simulations on Parallel Graphics Architectures

We present a physically-based fluid simulation with dynamic grid refinement on parallel SIMD graphics hardware. The irregular and dynamic structure of an adaptive grid requires sophisticated memory access patterns as well as a decomposition of the problem for parallel processing and the distribution of tasks to multiple threads. In this paper, we focus on the representation and management of th...

متن کامل

Practical and Verifiable C++ Dynamic Cast for Hard Real-Time Systems

Damian Dechev, Rabi Mahapatra, Bjarne Stroustrup The dynamic cast operation allows flexibility in the design and use of data management facilities in object-oriented programs. Dynamic cast has an important role in the implementation of the Data Management Services (DMS) of the Mission Data System Project (MDS), the Jet Propulsion Laboratory’s experimental work for providing a state-based and go...

متن کامل

Speech recognition with dynamic grammars using finite-state transducers

Spoken language systems, ranging from interactive voice response (IVR) to mixed-initiative conversational systems, make use of a wide range of recognition grammars and vocabularies. The recognition grammars are either static (created at design time) or dynamic (dependent on database lookup at run time). This paper examines the compilation of recognition grammars with an emphasis on the dynamic ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 36  شماره 

صفحات  -

تاریخ انتشار 2006